import { FormSchema } from '@/components/Form';
import { BasicColumn } from '@/components/Table';
export const searchFormSchema: FormSchema = [
  {
    field: 'taskName',
    label: '搜索',
    component: 'Input',
    colProps: {
      span: 6,
    },
    componentProps: {
      placeholder: '请输入任务名称/报表名称',
    },
  },
  {
    field: 'year',
    label: '年',
    show: false,
  },
  {
    field: 'month',
    label: '月',
    show: false,
  },
  {
    field: 'date',
    label: '时间',
    component: 'Input',
    slot: 'dateSelect',
    colProps: {
      span: 6,
    },
  },
  {
    field: 'status',
    label: '状态',
    component: 'Select',
    componentProps: {
      options: [
        {
          label: '全部',
          value: '0',
        },
        {
          label: '启用',
          value: 'on',
        },
        {
          label: '关闭',
          value: 'off',
        },
      ],
    },
    colProps: {
      span: 6,
    }
  },
];

export const columns: BasicColumn = [
  {
    title: '序号',
    dataIndex: 'no',
    width: 80,
  },
  {
    title: '任务名称',
    dataIndex: 'taskName',
    width: 150,
    slots: { customRender: 'taskName' },
  },
  {
    title: '任务分类',
    dataIndex: 'industryType',
    width: 120,
  },
  {
    title: '关联填报表',
    dataIndex: 'tableName',
    width: 120,
  },
  {
    title: '应填报数',
    dataIndex: 'reportTotal',
    width: 100,
  },
  {
    title: '任务执行周期',
    dataIndex: 'publishTime',
    width: 120,
  },
  {
    title: '修改任务',
    // dataIndex: 'edit',
    width: 100,
    slots: { customRender: 'edit' },
  },
  {
    title: '启用/关闭',
    dataIndex: 'onOff',
    width: 100,
    slots: { customRender: 'status' },
  },
];
